﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


using System.Data.SqlClient;
namespace XM
{
    public partial class LY_zc : Form
    {
        public LY_zc()
        {
            InitializeComponent();
        }

        private void LY_zc_Load(object sender, EventArgs e)
        {


        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text=="")
            {
               MessageBox.Show("用户名不能为空！");  
            }
            if (textBox2.Text == "")
            {
                MessageBox.Show("密码不能为空!");
            }
            if (textBox3.Text == "")
            {
                MessageBox.Show("确认密码不能为空!");
            }
            if (textBox2.Text != textBox3.Text)
            {
                MessageBox.Show("密码和确认密码不相符!");
                textBox2.Text = "";
                textBox3.Text = "";
            }
            try
            {
                string sql = string.Format("select * from dbo.zc where ZH='{0}'",textBox1.Text);
                SqlCommand cmd = new SqlCommand(sql);

            }
            catch (Exception)
            {
                
                throw;
            }
        }
    }
}